import os
import pynfdump
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import relationship, backref

Base=declarative_base()
class Nfdata(Base):
      __tablename__ = "nfdata"
      id = Column(Integer, primary_key=True)
      last = Column(DateTime)
      srcip = Column(String(18))
      srcport = Column(String(18))
      dstip = Column(String(18))
      dstport = Column(String(18))
      bytes = Column(Integer)
      packets = Column(Integer)
      flags = Column(String(18))
      prot = Column(String(18))
      tos = Column(String(20))
      def __init__(self, last, srcip, srcport, dstip, dstport, bytes, packets, flags, prot, tos):
         self.last = last
         self.srcip = srcip
	 self.srcport = srcport
	 self.dstip = dstip
	 self.dstport = dstport
	 self.bytes = bytes
	 self.packets = packets
	 self.flags = flags  
	 self.prot = prot
	 self.tos = tos
